home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 42 / 042.d81 / home sale (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  12KB  |  325 lines

  1. 0 print""chr$(142):rem lock into uppercase
  2. 1 clr:poke53280,0:poke53281,6:poke788,52
  3. 2 gosub 8000
  4. 3 gosub 9000
  5. 8 goto1000
  6. 20 qq=0:printtab(8)"is this correct? (y/n)[159]"
  7. 22 geta$
  8. 24 ifa$="[206]"ora$="n"thenqq=1:return
  9. 25 ifa$="[217]"ora$="y"thenreturn
  10. 26 goto22
  11. 30 print"[147]"spc(10)"h o m e   s a l e"
  12. 32 print"[155]round all amounts to the nearest dollar."
  13. 33 print"[145]     press return if amount is zero."
  14. 34 print"      press q at any time to quit"
  15. 36 return
  16. 40 k$="":te=peek(646):print" - [158]";:poke198,0.
  17. 41 print" [157][146]";:fort=1to50:next:print" [157][158]";
  18. 42 geta$:ifa$=""then41
  19. 43 ifa$="q"then10000
  20. 44 ifa$=chr$(13)thenprint:poke646,te:return
  21. 45 ifa$=chr$(20)andlen(k$)thenprint"[157] [157]";:k$=left$(k$,len(k$)-1):goto41
  22. 46 iflen(k$)>6then41
  23. 47 ifa$<"0"ora$>"9"then41
  24. 48 printa$;:k$=k$+a$
  25. 49 goto41
  26. 300 rem**menu page 3
  27. 310 print"[147]":printtab(3)"[158]calculating gain on sale of a home[146]"
  28. 315 print"[159]sale & purchase of principal residence"
  29. 340 printtab(9):print"[152](menu: screen 3 of 3)"
  30. 350 print"[158]7. gain postponed & new home basis"
  31. 355 print"q. to quit and exit to loadstar"
  32. 380 print"[155](note: round all amounts to the nearest dollar)"
  33. 390 get a$:ifa$<>"7" and a$<>"q" then goto 390
  34. 391 if a$="7" then goto 7000
  35. 395 if a$="q" then goto 10000
  36. 1000 gosub30:printtab(7)"[158]purchase price of old home[146][154]"
  37. 1040 print"price paid for house (press return if"
  38. 1050 print"house is a gift)";:gosub40:aa$=k$
  39. 1060 aa=val(aa$)
  40. 1070 print"transfer tax paid";
  41. 1080 gosub40:ab$=k$
  42. 1090 ab=val(ab$)
  43. 1100 print"attorney's fees paid";
  44. 1110 gosub40:ac$=k$
  45. 1120 ac=val(ac$)
  46. 1130 printtab(7)"purchase price=[146] $";aa+ab+ac
  47. 1140 az=aa+ab+ac
  48. 1150 gosub20:ifqqthen1000
  49. 2000 gosub30:printtab(11)"[158]basis on old home[146][154]"
  50. 2010 print"[154]select basis category (1, 2, [154]or 3[154])"
  51. 2020 print"1. [159]home was purchased"
  52. 2025 print"2. [159]home was a gift"
  53. 2030 print"3. [159]home was inherited[154]"
  54. 2040 geta$:ifa$<"1"ora$>"3"then2040
  55. 2045 ifa$="1"then3000
  56. 2050 ifa$<>"2"then2110
  57. 2060 print"enter the lesser of either the"
  58. 2070 print"fair market value or the donor's"
  59. 2080 print"adjusted basis at time of"
  60. 2085 print"acquisition";:gosub40:bz$=k$:bz=val(k$)
  61. 2090 printtab(7)"basis on old home[146] = $";bz
  62. 2091 gosub20:ifqqthen2000
  63. 2095 goto3000
  64. 2110 print"[154]inheritance basis (fair market"
  65. 2120 print"value)";:gosub40:bb$=k$:bz=val(bb$)
  66. 2130 printtab(7)"basis on old home[146] = $";bz
  67. 2140 gosub20:ifqqthen2000
  68. 3000 gosub30:printtab(7)"[158]adjusted basis of old home[146][154]"
  69. 3040 print"cost of improvements made (if covered"
  70. 3050 print"elsewhere, press return)";:gosub40:ca$=k$:ca=val(ca$)
  71. 3080 print"cost of further additions to your"
  72. 3081 print"home";:gosub40:cb$=k$:cb=val(cb$)
  73. 3090 print"cost of assessments (for example,"
  74. 3100 print"sidewalks and streets)";:gosub40:cc$=k$:cc=val(cc$)
  75. 3110 print"if house was a gift, enter any"
  76. 3120 print"transfer tax paid";:gosub40:ck$=k$:ck=val(ck$)
  77. 3130 print"if house was a gift enter any"
  78. 3140 print"attorney's fees paid";:gosub40:cl$=k$:cl=val(cl$)
  79. 3150 cd=ca+cb+cc+ck+cl
  80. 3160 gosub20:ifqqthen3000
  81. 3180 gosub30:printtab(7)"[158]adjusted basis of old home[146]"
  82. 3190 print"[154]amount of fire or other casualty"
  83. 3195 print"losses";:gosub40:ce$=k$:ce=val(ce$)
  84. 3200 print"payments you receive for easements or"
  85. 3210 print"rights-of-way you give up";:gosub40:cf$=k$:cf=val(cf$)
  86. 3220 print"amount of depreciation on home";:gosub40:cg$=k$:cg=val(cg$)
  87. 3230 print"amount of residential energy credit"
  88. 3235 print"claimed";:gosub40:ch$=k$:ch=val(ch$)
  89. 3240 ci=ce+cf+cg+ch
  90. 3250 cj=bz+cd
  91. 3260 cz=cj-ci
  92. 3270 printtab(3)"[154]adjusted basis old home = ";cz
  93. 3280 gosub20:ifqqthen3180
  94. 4000 gosub30:printtab(12)"[158]cost of new home[146][154]"
  95. 4040 print"transfer tax paid on new home";:gosub40:db$=k$:db=val(db$)
  96. 4050 print"attorney's fees paid";:gosub40:dc$=k$:dc=val(dc$)
  97. 4060 print"price paid for house (including"
  98. 4070 print"closing costs and any debts it is"
  99. 4080 print"subject to)";:gosub40:da$=k$:da=val(da$)
  100. 4090 dz=da+db+dc
  101. 4100 print"cost of new home=[146] $";dz
  102. 4110 gosub20:ifqqthen4000
  103. 5000 gosub30:printtab(12)"[158]selling expenses[146][154]"
  104. 5040 print"commissions paid";:gosub40:ea$=k$:ea=val(ea$)
  105. 5050 print"advertising costs paid";:gosub40:eb$=k$:eb=val(eb$)
  106. 5060 print"placement fees or 'points' paid";:gosub40:ec$=k$:ec=val(ec$)
  107. 5070 print"legal fees paid";:gosub40:ed$=k$:ed=val(ed$)
  108. 5080 print"transfer tax on sale of old home";:gosub40:ee$=k$:ee=val(ee$)
  109. 5090 print"sum of other closing cost items";:gosub40:ef$=k$:ef=val(ef$)
  110. 5100 ez=ea+eb+ec+ed+ee+ef
  111. 5110 print"selling expenses=[146] $";ez
  112. 5120 gosub20:ifqqthen5000
  113. 6000 gosub30:printtab(11)"[158]fixing up expenses[146]"
  114. 6010 print"[154]enter all expenses for work done"
  115. 6020 print"within 90[154] days before signing contract"
  116. 6030 print"to sell, and paid for within 30[154] days"
  117. 6040 print"after the sale. (these items cannot be"
  118. 6050 print"capital improvements; these only add"
  119. 6060 print"to your basis on the home.)"
  120. 6070 print"press return when finished[154]"
  121. 6080 fori=1to10
  122. 6090 print"cost of item"i;:gosub40:f$(i)=k$
  123. 6100 iff$(i)=""theni=10
  124. 6110 next
  125. 6220 fz=0:fori=1to9:fz=fz+val(f$(i)):next
  126. 6230 print"fixing up expenses=[146] $";fz
  127. 6240 gosub20:ifqqthen6000
  128. 7000 gosub30
  129. 7010 printtab(6)"[158]gain on sale of old home and"
  130. 7011 printtab(11)"basis of new home[146][144]"
  131. 7015 print"[154]selling price of old home";
  132. 7016 gosub40:ga$=k$:ga=val(ga$)
  133. 7018 print"[147]":printtab(10)"[158]gain on sale of homes[146][154]"
  134. 7020 print"selling expenses...........$";ez
  135. 7023 gb=ga-ez
  136. 7025 print"amount realized............$";gb
  137. 7030 print"basis of old home..........$";bz
  138. 7035 print"adjusted basis"
  139. 7036 print"of old home................$";cz
  140. 7040 gc=gb-cz
  141. 7041 print"[155]gain on old home...........$";gc
  142. 7045 gd=cz+gc
  143. 7046 print"amount realized"
  144. 7047 print"on old home................$";gd
  145. 7048 printtab(8)"press space to continue"
  146. 7049 geta$:ifa$<>" "then7049
  147. 7050 print"[147]":printtab(10)"[158]gain on sale of homes[146]"
  148. 7051 print"[154]fixing up"
  149. 7052 print"expenses...................$";fz
  150. 7053 ge=gd-fz
  151. 7054 print"adjusted sales price.......$";ge
  152. 7060 print"cost of new home...........$";dz
  153. 7065 gf=ge-dz
  154. 7066 print"gain not postponed.........$";gf
  155. 7070 gg=gc-gf
  156. 7071 print"gain postponed.............$";gg
  157. 7080 gh=dz-gg
  158. 7081 print"[154]cost of new home...........$";dz
  159. 7082 print"minus gain postponed.......$";gg
  160. 7085 print"= basis of new home = ....$";gh
  161. 7090 printtab(8)"press space to continue"
  162. 7091 geta$:ifa$<>" "then7091
  163. 7100 print"[147]":print"do you want a printed copy [158](y/n)[154]?"
  164. 7110 gosub22:ifqq=0then11000
  165. 7120 print"[147]  [158]press h[158] to return to home sale or"
  166. 7130 print"   press l[158] to return to loadstar"
  167. 7135 printtab(12)"*** warning: [146]***"
  168. 7136 print"[152]returning to home sale will result in"
  169. 7137 printtab(12)"loss of all data"
  170. 7138 poke198,0
  171. 7140 geta$:ifa$<>"h"anda$<>"l"then7140
  172. 7150 ifa$="h"thenrun
  173. 7160 printtab(9)"[158]returning to loadstar"
  174. 7165 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15:print""
  175. 7166 ifer<>63 then print"[147]":end
  176. 7170 load "hello connect",8:end
  177. 8000 print"[147]"
  178. 8030 poke53280,6:poke53281,0:print"[147][150] [213][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][201]
  179. 8040 [153]"def peek(NULL)lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenright$defpeek
  180. 8050 print" [194][194]         loadstar presents        [194][150][194]
  181. 8060 [153]" peekpeek                                  peekdefpeek
  182. 8070 print" [194][194]     home sale tax computation    [194][150][194]
  183. 8080 [153]" peekpeek                                  peekdefpeek
  184. 8090 print" [194][194]                by                [194][150][194]
  185. 8100 [153]" peekpeek                                  peekdefpeek
  186. 81